FROM           singulax/jdk:1.7
MAINTAINER     Summer      <yujianglei@singulax.com>


ENV            CATALINA_HOME  /usr/local/tomcat7
ENV            APP_DIR ${CATALINA_HOME}/webapps/

COPY           apache-tomcat-7.0.57.tar.gz   /usr/local/
RUN            cd /usr/local/  && \
               tar  zxvf   apache-tomcat-7.0.57.tar.gz   && \
               mv  apache-tomcat-7.0.57   tomcat7


ADD           scripts /scripts

RUN           chmod -R 755  /scripts
EXPOSE         8080 8443



VOLUME         ["$CATALINA_HOME/webapps"]

ENTRYPOINT     ["/scripts/run"]

ONBUILD  ADD  .  ${APP_DIR}

